<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN"><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="en-us">
<title>Assimp Plugin API reference</title>
<link rel="stylesheet" type="text/css" href="../../helpFiles/style.css">
<script type="text/javascript">
//
function getParameterByName(name, url = window.location.href)
{
    name = name.replace(/[\[\]]/g, '\\$&');
    var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
        results = regex.exec(url);
    if(!results) return null;
    if(!results[2]) return '';
    return decodeURIComponent(results[2].replace(/\+/g, ' '));
}
//
                </script><style type="text/css">
td.section { margin: 0; padding: 0; }
                </style>
</head>
<body>
<div align="center"><table class="allEncompassingTable">
<tr><td id="title" class="section"><h1>Assimp Plugin API reference</h1></td></tr>
<tr><td id="info" class="section"><p class="infoBox">Plugin for importing CAD files</p></td></tr>
<tr><td id="alphabetical" class="section"><pre class="lightGreyBox"><a href="?#exportDlg">simAssimp.exportDlg</a>
<a href="?#exportMeshes">simAssimp.exportMeshes</a>
<a href="?#exportShapes">simAssimp.exportShapes</a>
<a href="?#getExportFormat">simAssimp.getExportFormat</a>
<a href="?#getImportFormat">simAssimp.getImportFormat</a>
<a href="?#importDlg">simAssimp.importDlg</a>
<a href="?#importMeshes">simAssimp.importMeshes</a>
<a href="?#importShapes">simAssimp.importShapes</a>
</pre></td></tr>
<tr><td id="commands" class="section">
<h3 class="subsectionBar">
<a name="exportDlg" id="exportDlg"></a>simAssimp.exportDlg</h3>
<table class="apiTable">
<tr class="apiTableTr">
<td class="apiTableLeftDescr">
                                                    Description
                                                </td>
<td class="apiTableRightDescr">Offers export parameters via dialog, before calling simAssimp.export</td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftLSyn">Lua synopsis</td>
<td class="apiTableRightLSyn">simAssimp.exportDlg(string filename, table[] shapeHandles)<br>
</td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftLParam">Lua parameters</td>
<td class="apiTableRightLParam">
<div>
<strong>filename</strong> (string): The filename (including extension) of the CAD data</div>
<div>
<strong>shapeHandles</strong> (table): The handles of the shapes to export</div>
</td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftLRet">Lua return values</td>
<td class="apiTableRightLRet">-</td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftDescr">
                                                See also
                                            </td>
<td class="apiTableRightDescr"></td>
</tr>
</table>
<br><h3 class="subsectionBar">
<a name="exportMeshes" id="exportMeshes"></a>simAssimp.exportMeshes</h3>
<table class="apiTable">
<tr class="apiTableTr">
<td class="apiTableLeftDescr">
                                                    Description
                                                </td>
<td class="apiTableRightDescr">Exports the specified mesh data.</td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftLSyn">Lua synopsis</td>
<td class="apiTableRightLSyn">simAssimp.exportMeshes(table[] allVertices, table[] allIndices, string filename, string formatId, float scaling=1.0, int upVector=sim_assimp_upvect_z, int options=0)<br>
</td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftLParam">Lua parameters</td>
<td class="apiTableRightLParam">
<div>
<strong>allVertices</strong> (table): A table containing tables of vertices (one table entry per mesh)</div>
<div>
<strong>allIndices</strong> (table): A table containing tables of indices (one table entry per mesh)</div>
<div>
<strong>filename</strong> (string): The filename including its extension</div>
<div>
<strong>formatId</strong> (string): see simAssimp.getExportFormat</div>
<div>
<strong>scaling</strong> (float, default: 1.0): The desired mesh scaling.</div>
<div>
<strong>upVector</strong> (int, default: sim_assimp_upvect_z): The desired up-vector (see <a href="#enum:upVector">simAssimp.upVector</a>)</div>
<div>
<strong>options</strong> (int, default: 0): Export flags (256=silent)</div>
</td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftLRet">Lua return values</td>
<td class="apiTableRightLRet"></td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftDescr">
                                                See also
                                            </td>
<td class="apiTableRightDescr"></td>
</tr>
</table>
<br><h3 class="subsectionBar">
<a name="exportShapes" id="exportShapes"></a>simAssimp.exportShapes</h3>
<table class="apiTable">
<tr class="apiTableTr">
<td class="apiTableLeftDescr">
                                                    Description
                                                </td>
<td class="apiTableRightDescr">Exports the specified shapes. Depending on the fileformat, several files will be created (e.g. myFile.obj, myFile.mtl, myFile_2180010.png, etc.)</td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftLSyn">Lua synopsis</td>
<td class="apiTableRightLSyn">simAssimp.exportShapes(table[] shapeHandles, string filename, string formatId, float scaling=1.0, int upVector=sim_assimp_upvect_z, int options=0)<br>
</td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftLParam">Lua parameters</td>
<td class="apiTableRightLParam">
<div>
<strong>shapeHandles</strong> (table of int): The handles of the shapes to export</div>
<div>
<strong>filename</strong> (string): The filename including its extension</div>
<div>
<strong>formatId</strong> (string): see simAssimp.getExportFormat</div>
<div>
<strong>scaling</strong> (float, default: 1.0): The desired mesh scaling.</div>
<div>
<strong>upVector</strong> (int, default: sim_assimp_upvect_z): The desired up-vector (see <a href="#enum:upVector">simAssimp.upVector</a>)</div>
<div>
<strong>options</strong> (int, default: 0): Export flags (1=drop textures, 2=ignore colors, 4=drop normals, 8=export only visible, 256=silent, 512=coordinates relative to first shape's frame)</div>
</td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftLRet">Lua return values</td>
<td class="apiTableRightLRet"></td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftDescr">
                                                See also
                                            </td>
<td class="apiTableRightDescr"></td>
</tr>
</table>
<br><h3 class="subsectionBar">
<a name="getExportFormat" id="getExportFormat"></a>simAssimp.getExportFormat</h3>
<table class="apiTable">
<tr class="apiTableTr">
<td class="apiTableLeftDescr">
                                                    Description
                                                </td>
<td class="apiTableRightDescr">Allows to loop through supported file formats for export</td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftLSyn">Lua synopsis</td>
<td class="apiTableRightLSyn">string formatDescription, string formatExtension, string formatId=simAssimp.getExportFormat(int index)<br>
</td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftLParam">Lua parameters</td>
<td class="apiTableRightLParam"><div>
<strong>index</strong> (int): Zero-based index</div></td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftLRet">Lua return values</td>
<td class="apiTableRightLRet">
<div>
<strong>formatDescription</strong> (string): The description of the file format at the specified index, or an empty string</div>
<div>
<strong>formatExtension</strong> (string): The file extension of the file format at the specified index, or an empty string</div>
<div>
<strong>formatId</strong> (string): The file format ID at the specified index (needed when exporting), or an empty string</div>
</td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftDescr">
                                                See also
                                            </td>
<td class="apiTableRightDescr"></td>
</tr>
</table>
<br><h3 class="subsectionBar">
<a name="getImportFormat" id="getImportFormat"></a>simAssimp.getImportFormat</h3>
<table class="apiTable">
<tr class="apiTableTr">
<td class="apiTableLeftDescr">
                                                    Description
                                                </td>
<td class="apiTableRightDescr">Allows to loop through supported file formats for import</td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftLSyn">Lua synopsis</td>
<td class="apiTableRightLSyn">string formatDescription, string formatExtension=simAssimp.getImportFormat(int index)<br>
</td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftLParam">Lua parameters</td>
<td class="apiTableRightLParam"><div>
<strong>index</strong> (int): Zero-based index</div></td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftLRet">Lua return values</td>
<td class="apiTableRightLRet">
<div>
<strong>formatDescription</strong> (string): The description of the file format at the specified index, or an empty string</div>
<div>
<strong>formatExtension</strong> (string): The file extension of the file format at the specified index, or an empty string</div>
</td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftDescr">
                                                See also
                                            </td>
<td class="apiTableRightDescr"></td>
</tr>
</table>
<br><h3 class="subsectionBar">
<a name="importDlg" id="importDlg"></a>simAssimp.importDlg</h3>
<table class="apiTable">
<tr class="apiTableTr">
<td class="apiTableLeftDescr">
                                                    Description
                                                </td>
<td class="apiTableRightDescr">Offers import parameters via dialog, before calling simAssimp.import</td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftLSyn">Lua synopsis</td>
<td class="apiTableRightLSyn">table[] handles=simAssimp.importDlg(string filename)<br>
</td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftLParam">Lua parameters</td>
<td class="apiTableRightLParam"><div>
<strong>filename</strong> (string): The filename (including extension) of the CAD data</div></td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftLRet">Lua return values</td>
<td class="apiTableRightLRet"><div>
<strong>handles</strong> (table): The handles of the imported shapes</div></td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftDescr">
                                                See also
                                            </td>
<td class="apiTableRightDescr"></td>
</tr>
</table>
<br><h3 class="subsectionBar">
<a name="importMeshes" id="importMeshes"></a>simAssimp.importMeshes</h3>
<table class="apiTable">
<tr class="apiTableTr">
<td class="apiTableLeftDescr">
                                                    Description
                                                </td>
<td class="apiTableRightDescr">Imports the specified files as mesh data</td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftLSyn">Lua synopsis</td>
<td class="apiTableRightLSyn">table[] allVertices, table[] allIndices=simAssimp.importMeshes(string filenames, float scaling=0.0, int upVector=sim_assimp_upvect_auto, int options=0)<br>
</td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftLParam">Lua parameters</td>
<td class="apiTableRightLParam">
<div>
<strong>filenames</strong> (string): The filenames (semicolon-separated), including their extensions</div>
<div>
<strong>scaling</strong> (float, default: 0.0): The desired mesh scaling. 0.0 for automatic scaling</div>
<div>
<strong>upVector</strong> (int, default: sim_assimp_upvect_auto): The desired up-vector (see <a href="#enum:upVector">simAssimp.upVector</a>)</div>
<div>
<strong>options</strong> (int, default: 0): Import flags (8=do not optimize meshes, 16=keep inditical vertices, 32=one mesh per file, 128=ignore up vector coded in fileformat (e.g. Collada), 256=silent)</div>
</td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftLRet">Lua return values</td>
<td class="apiTableRightLRet">
<div>
<strong>allVertices</strong> (table): A table containing tables of vertices (one table entry per mesh)</div>
<div>
<strong>allIndices</strong> (table): A table containing tables of indices (one table entry per mesh)</div>
</td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftDescr">
                                                See also
                                            </td>
<td class="apiTableRightDescr"></td>
</tr>
</table>
<br><h3 class="subsectionBar">
<a name="importShapes" id="importShapes"></a>simAssimp.importShapes</h3>
<table class="apiTable">
<tr class="apiTableTr">
<td class="apiTableLeftDescr">
                                                    Description
                                                </td>
<td class="apiTableRightDescr">Imports the specified files as shapes</td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftLSyn">Lua synopsis</td>
<td class="apiTableRightLSyn">table[] shapeHandles=simAssimp.importShapes(string filenames, int maxTextureSize=512, float scaling=0.0, int upVector=sim_assimp_upvect_auto, int options=0)<br>
</td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftLParam">Lua parameters</td>
<td class="apiTableRightLParam">
<div>
<strong>filenames</strong> (string): The filenames (semicolon-separated), including their extensions</div>
<div>
<strong>maxTextureSize</strong> (int, default: 512): The desired maximum texture size (textures will be scaled)</div>
<div>
<strong>scaling</strong> (float, default: 0.0): The desired mesh scaling. 0.0 for automatic scaling</div>
<div>
<strong>upVector</strong> (int, default: sim_assimp_upvect_auto): The desired up-vector (see <a href="#enum:upVector">simAssimp.upVector</a>)</div>
<div>
<strong>options</strong> (int, default: 0): Import flags (1=drop textures, 2=ignore colors, 4=ignore transparency, 8=do not optimize meshes, 16=keep identical vertices, 32=generate one shape per file, 64=shapes have aligned orientations, 128=ignore up vector coded in fileformat (e.g. Collada), 256=silent)</div>
</td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftLRet">Lua return values</td>
<td class="apiTableRightLRet"><div>
<strong>shapeHandles</strong> (table of int): Handles of imported shapes</div></td>
</tr>
<tr class="apiTableTr">
<td class="apiTableLeftDescr">
                                                See also
                                            </td>
<td class="apiTableRightDescr"></td>
</tr>
</table>
<br>
</td></tr>
<tr><td id="enums" class="section">
<br><br><h1>Constants</h1>
<p>Constants used in the various functions. Refer to each constant using <i>enumName.constantName</i>, i.e. <b>simUI.curve_type.xy</b> for <b>xy</b> constant in <b>simUI.curve_type</b> enum.</p>
<h3 class="subsectionBar">
<a name="enum:upVector" id="enum:upVector"></a>simAssimp.upVector</h3>
<table class="apiConstantsTable"><tbody><tr><td>
<div>
<strong>auto</strong>: The up vector is automatically picked</div>
<div>
<strong>z</strong>: The up vector is along the file's Z-coordinate</div>
<div>
<strong>y</strong>: The up vector is along the file's Y-coordinate</div>
</td></tr></tbody></table>
</td></tr>
<tr><td id="structs" class="section"></td></tr>
<tr><td id="scriptFunctions" class="section"></td></tr>
</table></div>
<script type="text/javascript">
//
view = getParameterByName('view')
document.getElementById('alphabetical').style.display = view == 'alphabetical' ? 'table-cell' : 'none'
document.getElementById('commands').style.display = view == null ? 'table-cell' : 'none'
document.getElementById('enums').style.display = view == null ? 'table-cell' : 'none'
document.getElementById('structs').style.display = view == null ? 'table-cell' : 'none'
document.getElementById('scriptFunctions').style.display = view == null ? 'table-cell' : 'none'
//
                </script><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.6.0/styles/default.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.6.0/highlight.min.js"></script><script type="text/javascript">
//
document.addEventListener('DOMContentLoaded', (event) => {
    document.querySelectorAll('code.hljs').forEach((block) => {
        hljs.highlightBlock(block);
    });
});
//
                </script>
</body>
</html>
